<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:url var="ico_sheets" value="images/icons/sheets_icon.png" />
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><fmt:message key="appTitle" /></title>
<link rel="stylesheet" type="text/css"
	href='<c:url value="/styles/base.css" />' />
<link rel="stylesheet" type="text/css"
	href='<c:url value="/styles/charte.css" />' />
</head>
<body>

	<div id="global"><jsp:include page="header.jsp" />
		<jsp:include page="menu.jsp" />
		<div id="contenu">
			<h2>
				<img src="${ico_sheets}" />
				<fmt:message key="label.sheets-list" />
			</h2>
			<hr>
			<c:choose>
				<c:when test="${empty sheets }">
					<h2>
						<fmt:message key="no-available-sheet" />
					</h2>
				</c:when>
				<c:otherwise>
					<div id="gp">

						<table>
							<tr>
								<th width="20%"><fmt:message key="name" /></th>
								<th width="20%"><fmt:message key="sheet-state" />
								</th>
								<th width="20%"><fmt:message key="survey-state" />
								</th>
							</tr>
							<c:forEach var="sheet" items="${sheets}">
								<tr>
									<td width="35%"><a
										href="<c:url value="/sheet.htm?id=${sheet.id}"/>"> <c:out
												value="${sheet.survey.title }" /> </a></td>
									<td width="20%"><c:out value="${sheet.state }" /></td>
									<td width="20%"><c:if test="${sheet.survey.open}">ouvert</c:if>
										<c:if test="${ ! sheet.survey.open}">ferm&eacute;</c:if></td>
								</tr>
							</c:forEach>
						</table>
					</div>
				</c:otherwise>
			</c:choose>
		</div>
		<jsp:include page="footer.jsp" /></div>
</body>
</html>